package com.aurora.supermarket.util;

import android.content.Context;
import android.content.SharedPreferences;

/**
 * Created by Administrator on 2017/5/25.
 */
public class AppPreference extends BasePreferences {

    private static final String FILE_APP_PREFERENCES = "aurora_tea_app_preferences";
    public static final String IS_FIRST_LAUNCH = "is_first_launch";//是否第一次启动app
    public static final String USER_NAME = "username";
    public static final String PASS_WORD = "password";
    public static final String USER_ID = "memberId";
    public static final String PAY_PWD = "payPwd";
    public static final String CITY_ID = "cityId";
    public static final String LONGITUDE = "longitude";//经度
    public static final String LATIDUDE = "latitude";//维度
    public static final String ACCOUNT = "account";
    public static final String SIGN_DATE = "sign_date";//签到日期
    public static final String IS_PUSH = "is_push";//是否接收极光
    public static final String NO = "no";//砸蛋编号
    public static final String STOCK_MULTIPLE = "StockMultiple";//库存基数
    private static AppPreference mAppPreference;
    public static final String MOBILE = "Mobile";
    public static final String HAVESHOP  = "have_shop";//是否有店铺

    public AppPreference(SharedPreferences sharedPreferences) {
        super(sharedPreferences);
    }

    public static AppPreference getAppPreference() {
        return mAppPreference;
    }

    public static AppPreference init(Context context) {
        if (mAppPreference == null) {
            mAppPreference = new AppPreference(context.getSharedPreferences(FILE_APP_PREFERENCES, Context.MODE_PRIVATE));
        }
        return mAppPreference;
    }

}
